<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<title>学生成绩概览</title>
<c:import url="/WEB-INF/jsp/head.jsp" />
<c:import url="/WEB-INF/jsp/plugin/loading.jsp" />
<c:import url="/WEB-INF/jsp/plugin/circliful.jsp" />
<script type="text/javascript" src="static/js/Chart-2.6.0.js"></script>
<script type="text/javascript" src="static/js/score/student.js"></script>
<script type="text/javascript">
	// 及格率
	var passRate = ${passRate };
	// 前7标题
	var topTitles = [];
	// 前7分数
	var topPoints = [];
	// 前7及格分数线
	var passPoints = [];
	<c:forEach items="${topScores }" var="item">
		topTitles.push('${item.content }');
		topPoints.push(${item.point });
		passPoints.push(${item.passScore});
	</c:forEach>
</script>
</head>
<body>
	<div id="app" class="default-theme container-fluid iframe">
		<h3>${student.name } 成绩概览</h3>
		<h5>${student.classes.name }</h5>
		<hr />
		<div class="col-md-6">
			<div>
				<canvas id="c1" />
			</div>
			<br/>
			<div>
				<table class="table table-hover table-border">
					<thead>
						<tr>
							<th style="min-width: 6rem">考试内容</th>
							<th>考试类型</th>
							<th>考试方式</th>
							<th>分数</th>
							<th>总分</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${items }" var="item">
							<tr>
								<td>${item.content }</td>
								<td>${item.type.name }</td>
								<td>${item.pattern.name }</td>
								<td>${item.point }</td>
								<td>${item.totalScore }</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
		<div class="col-md-6">
			<div id="c2"></div>
		</div>
	</div>
</body>
</html>